

package org.ing.sisval.bl;

import java.util.ArrayList;
import org.ing.sisval.be.BEUbigeo;
import org.ing.sisval.da.DAUbigeo;
import org.ing.sisval.ds.DSUtil;
import org.rx.cr.bl.BLAbstract;
import org.rx.cr.conf.Config;


public class BLUbigeo extends BLAbstract<BEUbigeo> {

     private DAUbigeo dao;

    public BLUbigeo(Config conf){
setDSConeccion(DSUtil._DSConneccion(conf));
    }
//       public BLUbigeo(){
//setDSConeccion(DSUtil._DSConneccion());
//    }
    @Override
    public int registrar(BEUbigeo tipo) throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public int actualizarRegistro(BEUbigeo tipo) throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public int eliminarRegistro(BEUbigeo tipo) throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public ArrayList<BEUbigeo> buscarReferencia(String string) throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public ArrayList<BEUbigeo> listar() throws Exception {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public BEUbigeo buscar(int i) throws Exception {
          dao = new DAUbigeo(getConeccion());
        return dao.buscar(i); //To change body of generated methods, choose Tools | Templates.
    }
     public ArrayList<BEUbigeo> listarDepartamento() throws Exception {      
      dao = new DAUbigeo(getConeccion());
      return dao.listarDepartamento();
    }    
    public ArrayList<BEUbigeo> listarProvinciaDepartamento(String cod_region) throws Exception{      
        dao = new DAUbigeo(getConeccion());
        return dao.listarProvinciaDepartamento(cod_region);
    }    
    public ArrayList<BEUbigeo> listarDistritoProvinciaDepartamento(String cod_region, String cod_provincia) throws Exception{      
       dao = new DAUbigeo(getConeccion());
        return dao.listarDistritoProvinciaDepartamento(cod_region, cod_provincia);
    }
}
